<template>
    <div class="container" @click="handleGallaryClick">
        <div class="wrapper">
            <swiper :options="swiperOptions">
                <swiper-slide>
                    <img class="gallary-img" src="http://img1.qunarzz.com/piao/fusion/1712/91/a275569091681d02.jpg_640x200_0519ccb9.jpg" alt="">
                </swiper-slide>
                <swiper-slide>
                    <img class="gallary-img" src="http://img1.qunarzz.com/piao/fusion/1712/91/a275569091681d02.jpg_640x200_0519ccb9.jpg" alt="">
                </swiper-slide>
            </swiper>
            <div class="swiper-pagination"  slot="pagination"></div>
        </div>
    </div>
</template>
<script>
export default {
    name: 'CommonGallary',
    data () {
        return {
            swiperOptions: {
                pagination: '.swiper-pagination',
                paginationType: 'fraction',
                observeParents: true,
                observer: true
            }
        }
    },
    methods: {
        handleGallaryClick () {
            this.$emit('close');
        }
    }
}
</script>
<style lang="stylus" scoped>
    .container
        display: flex
        flex-direction: column
        justify-content: center
        z-index: 99
        position: fixed
        left: 0
        top: 0
        right: 0
        bottom: 0
        background: rgba(0, 0, 0, 1)
        .wrapper
            overflow: hidden
            width: 100%
            .gallary-img
                width: 100%
            .swiper-pagination
                color: #fff
                bottom: 1rem
                font-size: .24rem
</style>


